Skip to content

Validate annotation wire fields#264

Closed
leehack wants to merge 1 commit into
spec/base64-byte-validationfrom
spec/annotations-wire-validation
Closed

Validate annotation wire fields#264
leehack wants to merge 1 commit into
spec/base64-byte-validationfrom
spec/annotations-wire-validation

Conversation

@leehack

@leehack leehack commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • validate shared annotation audience, priority, and lastModified fields against the stable and MCP 2026 schemas
  • preserve vendor extension keys on map-backed annotation objects while rejecting malformed known fields
  • add regression coverage for typed annotations, resource links, and sampling content annotations

Validation

  • dart format lib/src/types/validation.dart lib/src/types/content.dart lib/src/types/resources.dart lib/src/types/sampling.dart test/mcp_2025_11_25_test.dart test/types/resources_test.dart test/types/sampling_test.dart test/types_test.dart
  • dart test test/types/resources_test.dart test/types_test.dart test/types/sampling_test.dart test/mcp_2025_11_25_test.dart
  • dart analyze
  • git diff --check
  • dart test
  • dart pub global run coverage:test_with_coverage

Stacked on #263. This remains a draft RC PR and stays off main until the official spec release.

@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.15686% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.77%. Comparing base (516bffb) to head (370996f).

Files with missing lines Patch % Lines
lib/src/types/sampling.dart 66.66% 4 Missing ⚠️
Additional details and impacted files
@@                       Coverage Diff                       @@
##           spec/base64-byte-validation     #264      +/-   ##
===============================================================
+ Coverage                        88.71%   88.77%   +0.05%     
===============================================================
  Files                               47       47              
  Lines                             9583     9615      +32     
===============================================================
+ Hits                              8502     8536      +34     
+ Misses                            1081     1079       -2     
Flag Coverage Δ
unittests 88.77% <92.15%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@leehack leehack mentioned this pull request Jun 1, 2026
@leehack

leehack commented Jun 1, 2026

Copy link
Copy Markdown
Owner Author

Closing this draft micro PR because the RC spec work has been consolidated into a smaller reviewable stack. This change is preserved in #271 (type/schema validation); the consolidated tip is tree-identical to the previous micro-stack tip.

@leehack leehack closed this Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant